﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for Polyline
/// </summary>
public class Polyline
{
   
        string _linestatus = ""; //N-New, D-Deleted, C-Changed, ''-No Action
        public string LineStatus
        {
            get { return _linestatus; }
            set { _linestatus = value; }
        }

        string _id = "";
        public string ID
        {
            get { return _id; }
            set { _id = value; }
        }

        GooglePoints _gpoints = new GooglePoints();
        public GooglePoints ArrayPoint
        {
            get { return _gpoints; }
            set { _gpoints = value; }
        }

        string _colorcode = "#66FF00";
        public string ColorCode
        {
            get { return _colorcode; }
            set { _colorcode = value; }
        }

        int _width = 10;
        public int Width
        {
            get { return _width; }
            set { _width = value; }
        }

        private double _opacity = 1.0;

        public double Opacity
        {
            get { return _opacity; }
            set { _opacity = value; }
        }

        public override bool Equals(System.Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return false;
            }

            // If parameter cannot be cast to Point return false.
            Polyline p = obj as Polyline;
            if ((System.Object)p == null)
            {
                return false;
            }

            // Return true if the fields match:
            return (Width == p.Width) && (p.ID == ID) && (p.ColorCode == ColorCode) && p.ArrayPoint.Equals(ArrayPoint) && (p.Opacity == Opacity);
        }
}